package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbFormulariosCampos generated by hbm2java
 */
@Entity
@Table(name = "TB_FORMULARIOS_CAMPOS", schema = "CATALOGOS")
public class TbFormulariosCampos implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private TbFormulariosCamposId id;
	private TbFormulariosVersiones tbFormulariosVersiones;
	private TbFormulariosSecciones tbFormulariosSecciones;
	private String scasilla;
	private String dcampo;
	private Integer dvcampo;
	private Integer brequerido;
	private Integer beditable;
	private Integer bvisible;
	private String slistaValor;
	private String stipoDato;
	private String scondicion;
	private String stabla;
	private String scampo;
	private Integer bestado;
	private String cusuario;
	private Date fingreso;
	private Integer bcalcula;
	private String scampoDocumental;
	private Integer bmonetario;
	private Integer ndecimales;
	private Integer nlongitudExogena;
	private Integer bdobleDig;
	private String mtipoCasilla;
	private Set<TbCamposExpresiones> tbCamposExpresioneses = new HashSet<TbCamposExpresiones>(
			0);
	private Set<EdRubroConceptualExpr> edRubroConceptualExprs = new HashSet<EdRubroConceptualExpr>(
			0);

	public TbFormulariosCampos() {
	}

	public TbFormulariosCampos(TbFormulariosCamposId id,
			TbFormulariosVersiones tbFormulariosVersiones,
			TbFormulariosSecciones tbFormulariosSecciones, String scasilla,
			String dcampo, Integer dvcampo, Integer brequerido,
			Integer beditable, Integer bvisible, Integer bestado,
			String cusuario, Date fingreso, Integer bcalcula, Integer bmonetario) {
		this.id = id;
		this.tbFormulariosVersiones = tbFormulariosVersiones;
		this.tbFormulariosSecciones = tbFormulariosSecciones;
		this.scasilla = scasilla;
		this.dcampo = dcampo;
		this.dvcampo = dvcampo;
		this.brequerido = brequerido;
		this.beditable = beditable;
		this.bvisible = bvisible;
		this.bestado = bestado;
		this.cusuario = cusuario;
		this.fingreso = fingreso;
		this.bcalcula = bcalcula;
		this.bmonetario = bmonetario;
	}

	public TbFormulariosCampos(TbFormulariosCamposId id,
			TbFormulariosVersiones tbFormulariosVersiones,
			TbFormulariosSecciones tbFormulariosSecciones, String scasilla,
			String dcampo, Integer dvcampo, Integer brequerido,
			Integer beditable, Integer bvisible, String slistaValor,
			String stipoDato, String scondicion, String stabla, String scampo,
			Integer bestado, String cusuario, Date fingreso, Integer bcalcula,
			String scampoDocumental, Integer bmonetario, Integer ndecimales,
			Integer nlongitudExogena, Integer bdobleDig, String mtipoCasilla,
			Set<TbCamposExpresiones> tbCamposExpresioneses,
			Set<EdRubroConceptualExpr> edRubroConceptualExprs) {
		this.id = id;
		this.tbFormulariosVersiones = tbFormulariosVersiones;
		this.tbFormulariosSecciones = tbFormulariosSecciones;
		this.scasilla = scasilla;
		this.dcampo = dcampo;
		this.dvcampo = dvcampo;
		this.brequerido = brequerido;
		this.beditable = beditable;
		this.bvisible = bvisible;
		this.slistaValor = slistaValor;
		this.stipoDato = stipoDato;
		this.scondicion = scondicion;
		this.stabla = stabla;
		this.scampo = scampo;
		this.bestado = bestado;
		this.cusuario = cusuario;
		this.fingreso = fingreso;
		this.bcalcula = bcalcula;
		this.scampoDocumental = scampoDocumental;
		this.bmonetario = bmonetario;
		this.ndecimales = ndecimales;
		this.nlongitudExogena = nlongitudExogena;
		this.tbCamposExpresioneses = tbCamposExpresioneses;
		this.edRubroConceptualExprs = edRubroConceptualExprs;
		this.bdobleDig = bdobleDig;
		this.mtipoCasilla = mtipoCasilla;
	}

	
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "cformulario", column = @Column(name = "C_FORMULARIO", nullable = false, precision = 4, scale = 0)),
			@AttributeOverride(name = "cversion", column = @Column(name = "C_VERSION", nullable = false, precision = 4, scale = 0)),
			@AttributeOverride(name = "ccampo", column = @Column(name = "C_CAMPO", nullable = false, precision = 4, scale = 0)) })
	public TbFormulariosCamposId getId() {
		return this.id;
	}

	public void setId(TbFormulariosCamposId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_FORMULARIO", referencedColumnName = "C_FORMULARIO", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "C_VERSION", referencedColumnName = "C_VERSION", nullable = false, insertable = false, updatable = false) })
	public TbFormulariosVersiones getTbFormulariosVersiones() {
		return this.tbFormulariosVersiones;
	}

	public void setTbFormulariosVersiones(
			TbFormulariosVersiones tbFormulariosVersiones) {
		this.tbFormulariosVersiones = tbFormulariosVersiones;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_SECCION", nullable = false)
	public TbFormulariosSecciones getTbFormulariosSecciones() {
		return this.tbFormulariosSecciones;
	}

	public void setTbFormulariosSecciones(
			TbFormulariosSecciones tbFormulariosSecciones) {
		this.tbFormulariosSecciones = tbFormulariosSecciones;
	}

	@Column(name = "S_CASILLA", nullable = false, length = 200)
	public String getScasilla() {
		return this.scasilla;
	}

	public void setScasilla(String scasilla) {
		this.scasilla = scasilla;
	}

	@Column(name = "D_CAMPO", nullable = false, length = 80)
	public String getDcampo() {
		return this.dcampo;
	}

	public void setDcampo(String dcampo) {
		this.dcampo = dcampo;
	}

	@Column(name = "DV_CAMPO", nullable = false, precision = 1, scale = 0)
	public Integer getDvcampo() {
		return this.dvcampo;
	}

	public void setDvcampo(Integer dvcampo) {
		this.dvcampo = dvcampo;
	}

	@Column(name = "B_REQUERIDO", nullable = false, precision = 1, scale = 0)
	public Integer getBrequerido() {
		return this.brequerido;
	}

	public void setBrequerido(Integer brequerido) {
		this.brequerido = brequerido;
	}

	@Column(name = "B_EDITABLE", nullable = false, precision = 1, scale = 0)
	public Integer getBeditable() {
		return this.beditable;
	}

	public void setBeditable(Integer beditable) {
		this.beditable = beditable;
	}

	@Column(name = "B_VISIBLE", nullable = false, precision = 1, scale = 0)
	public Integer getBvisible() {
		return this.bvisible;
	}

	public void setBvisible(Integer bvisible) {
		this.bvisible = bvisible;
	}

	@Column(name = "S_LISTA_VALOR")
	public String getSlistaValor() {
		return this.slistaValor;
	}

	public void setSlistaValor(String slistaValor) {
		this.slistaValor = slistaValor;
	}

	@Column(name = "S_TIPO_DATO")
	public String getStipoDato() {
		return this.stipoDato;
	}

	public void setStipoDato(String stipoDato) {
		this.stipoDato = stipoDato;
	}

	@Column(name = "S_CONDICION", length = 4000)
	public String getScondicion() {
		return this.scondicion;
	}

	public void setScondicion(String scondicion) {
		this.scondicion = scondicion;
	}

	@Column(name = "S_TABLA")
	public String getStabla() {
		return this.stabla;
	}

	public void setStabla(String stabla) {
		this.stabla = stabla;
	}

	@Column(name = "S_CAMPO")
	public String getScampo() {
		return this.scampo;
	}

	public void setScampo(String scampo) {
		this.scampo = scampo;
	}

	@Column(name = "B_ESTADO", nullable = false, precision = 1, scale = 0)
	public Integer getBestado() {
		return this.bestado;
	}

	public void setBestado(Integer bestado) {
		this.bestado = bestado;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 40)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_INGRESO", nullable = false, length = 7)
	public Date getFingreso() {
		return this.fingreso;
	}

	public void setFingreso(Date fingreso) {
		this.fingreso = fingreso;
	}

	@Column(name = "B_CALCULA", nullable = false, precision = 1, scale = 0)
	public Integer getBcalcula() {
		return this.bcalcula;
	}

	public void setBcalcula(Integer bcalcula) {
		this.bcalcula = bcalcula;
	}

	@Column(name = "S_CAMPO_DOCUMENTAL")
	public String getScampoDocumental() {
		return this.scampoDocumental;
	}

	public void setScampoDocumental(String scampoDocumental) {
		this.scampoDocumental = scampoDocumental;
	}

	@Column(name = "B_MONETARIO", nullable = false, precision = 1, scale = 0)
	public Integer getBmonetario() {
		return this.bmonetario;
	}

	public void setBmonetario(Integer bmonetario) {
		this.bmonetario = bmonetario;
	}

	@Column(name = "N_DECIMALES", precision = 1, scale = 0)
	public Integer getNdecimales() {
		return this.ndecimales;
	}

	public void setNdecimales(Integer ndecimales) {
		this.ndecimales = ndecimales;
	}

	@Column(name = "N_LONGITUD_EXOGENA", precision = 4, scale = 0)
	public Integer getNlongitudExogena() {
		return this.nlongitudExogena;
	}

	public void setNlongitudExogena(Integer nlongitudExogena) {
		this.nlongitudExogena = nlongitudExogena;
	}
	
	@Column(name = "B_DOBLE_DIG", precision = 1, scale = 0)
	public Integer getBdobleDig() {
		return bdobleDig;
	}

	public void setBdobleDig(Integer bdobleDig) {
		this.bdobleDig = bdobleDig;
	}

	@Column(name = "M_TIPO_CASILLA", length = 2)
	public String getMtipoCasilla() {
		return mtipoCasilla;
	}

	public void setMtipoCasilla(String mtipoCasilla) {
		this.mtipoCasilla = mtipoCasilla;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbFormulariosCampos")
	public Set<TbCamposExpresiones> getTbCamposExpresioneses() {
		return this.tbCamposExpresioneses;
	}

	public void setTbCamposExpresioneses(
			Set<TbCamposExpresiones> tbCamposExpresioneses) {
		this.tbCamposExpresioneses = tbCamposExpresioneses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbFormulariosCampos")
	public Set<EdRubroConceptualExpr> getEdRubroConceptualExprs() {
		return this.edRubroConceptualExprs;
	}

	public void setEdRubroConceptualExprs(
			Set<EdRubroConceptualExpr> edRubroConceptualExprs) {
		this.edRubroConceptualExprs = edRubroConceptualExprs;
	}

}
